﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WF_DepartmentManagement.aspx.cs" MasterPageFile="~/index.Master" Inherits="Prototype1.AdminCompany.WF_DepartmentManagement" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">
        
    <h2>Adicione novo departamento</h2>
    <h3>Especifique um nome:</h3>

    <asp:TextBox ID="tb_dep_name" runat="server"></asp:TextBox>
    
    <asp:Button ID="save" runat="server" Text="Adicionar" OnClick="SaveDepartment" />    
    <asp:Label ID="save_status" runat="server" Text=""></asp:Label>
    
    <br />
    <br />
    
    
    <h2>Departamentos currentes</h2>
    <asp:PlaceHolder ID="dep_list" runat="server"></asp:PlaceHolder>
    <h3><asp:Label ID="dep_list_status" runat="server" Text="Sem departamentos"></asp:Label></h3>
    
    <br />
    <br />
    
    <h2>Adicione novo nível</h2>
    <h3>Escolha departamento:  <asp:DropDownList ID="drop_down_department_list" runat="server" AutoPostBack="true" OnSelectedIndexChanged="UpdateLevelList"></asp:DropDownList></h3>
    <asp:PlaceHolder ID="dep_level_list" runat="server"></asp:PlaceHolder>
    <table>
    <tr><td>Nome:</td><td><asp:TextBox ID="tb_level_name" runat="server"/></td><td><asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="tb_level_name" Display="Dynamic" ErrorMessage="Não pode ficar vazio"></asp:RequiredFieldValidator></td></tr>
    <tr><td>Nivel:</td><td><asp:TextBox ID="tb_level_level" runat="server" MaxLength="1" Width="35px" /></td><td><asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tb_level_level" Display="Dynamic" ErrorMessage="Não pode ficar vazio"></asp:RequiredFieldValidator>
    <asp:RegularExpressionValidator ID="rev" runat="server" ControlToValidate="tb_level_level" Enabled="false" Display="Dynamic" ValidationExpression="/d{1}" ErrorMessage="Numero entre [0..9]"></asp:RegularExpressionValidator>
    </td></tr>
    </table>
    <h3><asp:Label ID="dep_level_list_status" runat="server" Text="Sem níveis"></asp:Label></h3>
    
    
    
    <asp:Button ID="Button1" runat="server" Text="Add" OnClick="SaveLevel" />
</asp:Content>

